//
//  MK_BarrageManagerPacketModel.h
//  miku直播
//
//  Created by 杨尚达 on 2017/7/21.
//  Copyright © 2017年 杨尚达. All rights reserved.
//

#import <Foundation/Foundation.h>

///数据包类型
typedef NS_ENUM(unsigned short int, MK_BarrageManagerPacketModelType) {
    ///发送包
    MK_BarrageManagerPacketModelType_Send = 689,
    ///接受包
    MK_BarrageManagerPacketModelType_Receive = 690
};


///链接的数据包模型
@interface MK_BarrageManagerPacketModel : NSObject

///消息长度
@property(readonly,nonatomic,assign)unsigned int dataLength;

///消息类型
@property(nonatomic,assign)MK_BarrageManagerPacketModelType type;

///加密字段 默认0
@property(nonatomic,assign)unsigned char encryStr;

///保留字段 默认0
@property(nonatomic,assign)unsigned char reserveStr;

///内容
@property(nonatomic,copy)NSString* contentStr;


/**
 得到原始数据包类型

 @return 数据包
 */
-(NSData*)getRawData;

///将二进制包转模型
+(instancetype)MK_BarrageManagerPacketModelWithRawData:(NSData*)data;

@end
